﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="test_ASPnet._Default" %>

<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
               
                <h2>Kryteria rekordów do załadowania<br />
                </h2>
            </hgroup>
            <table class="auto-style1">
                <tr>
                    <td>
                        <asp:Label ID="Label1" runat="server" Text="CampaingID"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="Label2" runat="server" Text="CampaingCycle"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="Label3" runat="server" Text="CampaingNode"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="Label4" runat="server" Text="Date"></asp:Label>
                    </td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td>
                        <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="srcCampaingID" DataTextField="CAMPAIGN_ID" DataValueField="CAMPAIGN_ID">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="srcCampaingID" runat="server" ConnectionString="<%$ ConnectionStrings:CCP_DBDConnStr %>" SelectCommand="SELECT DISTINCT [CAMPAIGN_ID] FROM [SSIS_TMOBILE_REKORDY_test]"></asp:SqlDataSource>
                    </td>
                    <td>
                        <asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="scrCampaingCycle" DataTextField="CAMPAIGNCYCLE" DataValueField="CAMPAIGNCYCLE" AutoPostBack="True">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="scrCampaingCycle" runat="server" ConnectionString="<%$ ConnectionStrings:CCP_DBDConnStr %>" SelectCommand="SELECT DISTINCT CAMPAIGNCYCLE FROM dbo.SSIS_TMOBILE_REKORDY_test WHERE (CAMPAIGN_ID = @CAMPAIGN_ID)">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="DropDownList1" Name="CAMPAIGN_ID" PropertyName="SelectedValue" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </td>
                    <td>
                        <asp:DropDownList ID="DropDownList3" runat="server" DataSourceID="srcCampaingNode" DataTextField="CAMPAIGNNODEID" DataValueField="CAMPAIGNNODEID" AutoPostBack="True">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="srcCampaingNode" runat="server" ConnectionString="<%$ ConnectionStrings:CCP_DBDConnStr %>" SelectCommand="SELECT DISTINCT [CAMPAIGNNODEID] FROM [SSIS_TMOBILE_REKORDY_test] WHERE (([CAMPAIGN_ID] = @CAMPAIGN_ID)) AND ([CAMPAIGNCYCLE] = @CAMPAIGNCYCLE)">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="DropDownList2" DefaultValue="0" Name="CAMPAIGNCYCLE"  PropertyName="SelectedValue" Type="String" />
                                <asp:ControlParameter ControlID="DropDownList1" DefaultValue="0" Name="CAMPAIGN_ID" PropertyName="SelectedValue" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </td>
                    <td>
                        <asp:DropDownList ID="DropDownList4" runat="server" AutoPostBack="True" DataSourceID="scrDATE" DataTextField="DATE" DataValueField="DATE">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="scrDATE" runat="server" ConnectionString="<%$ ConnectionStrings:CCP_DBDConnStr %>" SelectCommand="SELECT DISTINCT (convert(varchar(10),[DATE_TIME_STAMP],120)) AS DATE FROM [SSIS_TMOBILE_REKORDY_test] WHERE (([CAMPAIGN_ID] = @CAMPAIGN_ID)) AND ([CAMPAIGNCYCLE] = @CAMPAIGNCYCLE) AND ([CAMPAIGNCYCLE] = @CAMPAIGNCYCLE) AND ([CAMPAIGNNODEID] = @CAMPAIGNODEID)">
                             <SelectParameters>
                                <asp:ControlParameter ControlID="DropDownList3" DefaultValue="0" Name="CAMPAIGNODEID"  PropertyName="SelectedValue" Type="String" />
                                 <asp:ControlParameter ControlID="DropDownList2" DefaultValue="0" Name="CAMPAIGNCYCLE"  PropertyName="SelectedValue" Type="String" />
                                <asp:ControlParameter ControlID="DropDownList1" DefaultValue="0" Name="CAMPAIGN_ID" PropertyName="SelectedValue" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </td>
                    <td>&nbsp;</td>
                </tr>
            </table>
            <br />
   
        </div>
    </section>
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <h3>Liczba Rekordów: <asp:Label ID="Label5" runat="server" Text="Label"></asp:Label>
&nbsp; <asp:TextBox ID="txtRekCount" runat="server" TextMode="Number" AutoPostBack="True" OnTextChanged="txtRekCount_TextChanged"></asp:TextBox>
    </h3>
    
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" DataSourceID="ds2" ForeColor="#333333" GridLines="None" AllowPaging="True" PageSize="20" ShowFooter="True">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                
                <asp:BoundField DataField="ID_CP" HeaderText="ID_CP" InsertVisible="False" ReadOnly="True" SortExpression="ID_CP" />
                <asp:BoundField DataField="CAMPAIGN_ID" HeaderText="CAMPAIGN_ID" SortExpression="CAMPAIGN_ID" />
                <asp:BoundField DataField="CAMPAIGNCYCLE" HeaderText="CAMPAIGNCYCLE" SortExpression="CAMPAIGNCYCLE" />
                <asp:BoundField DataField="CAMPAIGNNODEID" HeaderText="CAMPAIGNNODEID" SortExpression="CAMPAIGNNODEID" />
                <asp:BoundField DataField="KEYCODE" HeaderText="KEYCODE" SortExpression="KEYCODE" />
                <asp:BoundField DataField="DATE" HeaderText="DATA" SortExpression="DATE" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <asp:SqlDataSource  ID="ds2" runat="server" ConnectionString="<%$ ConnectionStrings:CCP_DBDConnStr %>" SelectCommand="SELECT [ID_CP], [CAMPAIGN_ID], [CAMPAIGNCYCLE], [CAMPAIGNNODEID], [KEYCODE],convert(varchar(10),[DATE_TIME_STAMP],120) AS DATE FROM [SSIS_TMOBILE_REKORDY_test] 
WHERE 1=1 
AND ([CAMPAIGN_ID] = @CAMPAIGN_ID)
AND ([CAMPAIGNCYCLE] = @CAMPAIGNCYCLE)
AND ([CAMPAIGNNODEID] = @CAMPAIGNODEID)
AND (convert(varchar(10),[DATE_TIME_STAMP],120) = @DATE)" OnSelected="ds2_Selected">
            <SelectParameters>
                <asp:ControlParameter ControlID="FeaturedContent$DropDownList1" DefaultValue="0" Name="CAMPAIGN_ID" PropertyName="SelectedValue" Type="String" />
                <asp:ControlParameter ControlID="FeaturedContent$DropDownList2" DefaultValue="0" Name="CAMPAIGNCYCLE" PropertyName="SelectedValue" />
                <asp:ControlParameter ControlID="FeaturedContent$DropDownList3" DefaultValue="0" Name="CAMPAIGNODEID" PropertyName="SelectedValue" />
                <asp:ControlParameter ControlID="FeaturedContent$DropDownList4" DefaultValue="0" Name="DATE" PropertyName="SelectedValue" />
            </SelectParameters>
            
        </asp:SqlDataSource>
    </p>
    <ol class="round">
        <li class="one">
            <h5>Getting Started</h5>
            ASP.NET Web Forms lets you build dynamic websites using a familiar drag-and-drop, event-driven model.
            A design surface and hundreds of controls and components let you rapidly build sophisticated, powerful UI-driven sites with data access.
            <a href="http://go.microsoft.com/fwlink/?LinkId=245146">Learn more…</a>
        </li>
        <li class="two">
            <h5>Add NuGet packages and jump-start your coding</h5>
            NuGet makes it easy to install and update free libraries and tools.
            <a href="http://go.microsoft.com/fwlink/?LinkId=245147">Learn more…</a>
        </li>
        <li class="three">
            <h5>Find Web Hosting</h5>
            You can easily find a web hosting company that offers the right mix of features and price for your applications.
            <a href="http://go.microsoft.com/fwlink/?LinkId=245143">Learn more…</a>
        </li>
    </ol>
</asp:Content>
<asp:Content ID="Content1" runat="server" contentplaceholderid="HeadContent">
    <style type="text/css">
        .auto-style1 {
            width: 100%;
        }
    </style>
</asp:Content>

